home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / A-B / ButtonStax.cpt / Region Buttons / card_2994.txt < prev    next >
Text File  |  1989-02-26  |  1KB  |  45 lines

  1. -- card: 2994 from stack: in
  2. -- bmap block id: 7913
  3. -- flags: 0000
  4. -- background id: 2722
  5. -- name: 
  6.  
  7.  
  8. -- part 3 (button)
  9. -- low flags: 00
  10. -- high flags: 0000
  11. -- rect: left=412 top=47 right=73 bottom=441
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 2478 / 2478
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: 
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   push this card
  23.   visual effect zoom open
  24.   go to card "About"
  25. end mouseUp
  26.  
  27.  
  28.  
  29. -- part contents for background part 13
  30. ----- text -----
  31. This is a stack that shows one possible way of incorporating regions as buttons. By using an XCMD to handle the creation and deletion of regions, as well as testing for hits within those regions, we can have 'buttons' that are any shape we please.
  32.  
  33. For example, our button could look like this:
  34.  
  35. Or like this:
  36.  
  37. Or even like this (with a hole in the middle that is not part of the button):
  38.  
  39. -- part contents for background part 14
  40. ----- text -----
  41. Regions as Buttons
  42.  
  43. -- part contents for background part 15
  44. ----- text -----
  45. 1